package cn.school.controller.studyManage;

import cn.school.common.api.CommonResult;
import cn.school.studyManage.service.StudentBehaviorCfgItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Api(tags = {"StudentBehaviorCfgItemController => 行为配置评分项"})
@RequestMapping("student/behavior/cfg/item")
public class StudentBehaviorCfgItemController {

    @Autowired
    StudentBehaviorCfgItemService cfgItemService;

    @ApiOperation("find => 通过配置项id查询配置子项")
    @GetMapping("/findCfgItemByCfgId/{cfgId}")
    public CommonResult findCfgItemByCfgId(@PathVariable("cfgId") Long cfgId){
        return CommonResult.success(cfgItemService.findCfgItemByCfgId(cfgId));
    }
}
